import { queryOrderInfoList } from '../../services/order'

Component({
  options: {
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {
    nowStep: {
      type: String,
      value: "toBeProcessed",
    },
    orderList:{
      type: Array,
      value: [],
    }
  },

  created(){
    console.log("order list created")
  },

  attached(){
    console.log("order list attached")
  },

  detached(){
    console.log("order list detached")
  },

  pageLifetimes: {
    show: function() {
      // 页面被展示
      console.log("order list show")
    },
    hide: function() {
      // 页面被隐藏
      console.log("order list hide")
    },
  },

  data: {
    message:'委托人因典当需要，委托我方对该车辆进行技术状况测评，请及时处理!',
    // orderList:[],
    status:"",
  },

  /**
   * 组件的方法列表
   */
  methods: {
    // 查看详情
    handleClickDetail(event){
      let currentItem = event.currentTarget.dataset.currentitem
      this.triggerEvent("viewDetailAction", currentItem)
    },

    // 查看报告
    handleViewReport(event){
      let currentItem = event.detail
      this.triggerEvent("viewReportAction", currentItem)
    },

    // 再次预约
    handleAppointmentAgain(event){
      let currentItem = event.detail
      this.triggerEvent("appointmentAgainAction", currentItem)
    },

    // 修改预约
    handleEditOrder(event){
      let currentItem = event.detail
      this.triggerEvent("editOrderAction", currentItem)
    },

    // 取消预约
    handleCancel(event){
      let currentItem = event.detail
      this.triggerEvent("cancelAction", currentItem)
    }
  }
})
